Complete Backtest
Kerry Back

Overview
- Get data
- Filter based on, e.g., size if desired
- Define industries and industry dummies if desired
- Transform features and ret in each cross-section
- Define pipeline
Loop
- For each date in a set of training dates,
- Define training data = past
- Fit GridSearchCV to pipeline on training data
- Use the trained model to make predictions for each month until the next training date
Compute returns
- Use predictions to define portfolios at the beginning of each month. Example: best 100 and worst 100, equally weighted
- Use actual (not transformed) stock returns to compute portfolio returns
Evaluate returns
- Raw: Sharpe ratio, accumulation, drawdowns)
- Compared to beta-adjusted market benchmark: alpha, information ratio
- Compare to market and other factors (e.g., Fama-French: alpha, information ratio, attribution analysis